﻿using CC.Extending;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Demo
{
    public partial class FrmEditAxis : Form
    {
        public (double max, double min, double interval) AxisValue
        {
            get
            {
                return (txtMax.Text.ToSingle(), txtMin.Text.ToSingle(), txtInterval.Text.ToSingle());
            }
        }
        public FrmEditAxis((double max, double min, double interval) axisValue, string title)
        {
            InitializeComponent();
            txtMax.Text = axisValue.max.ToString();
            txtMin.Text = axisValue.min.ToString();
            txtInterval.Text = axisValue.interval.ToString();
            Text = title;
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.OK;
            Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }
    }
}
